package com.augurit.wf.common.entity;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.augurit.common.syslog.tool.IPropertyComment;

/**
 * 公告板Entity类
 *
 */
@Entity
@Table(name = "NOTICE")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Notice implements IPropertyComment {

	//属性
	private Long id;		//主键
	private String title;	//标题
	private String publisher;	//发布者
	private String content;		//内容
	private Date publishTime;	//发布时间
	private String importance;	//重要性
	private String isPublish;	//是否发布
	
	public Map<String, String> buildPropertyComment() {
		Map<String, String> map = new HashMap();
		map.put("title", "标题");
		map.put("publisher", "发布人");
		map.put("publishTime", "发布时间");
		map.put("content", "内容");
		return map;
	}	
	
	@Id
    @SequenceGenerator(name="SEQ_NOTICE", sequenceName="SEQ_NOTICE", allocationSize=1)
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_NOTICE")
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getPublisher() {
		return publisher;
	}
	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getPublishTime() {
		return publishTime;
	}
	public void setPublishTime(Date publishTime) {
		this.publishTime = publishTime;
	}

	public String getImportance() {
		return importance;
	}

	public void setImportance(String importance) {
		this.importance = importance;
	}

	public String getIsPublish() {
		return isPublish;
	}

	public void setIsPublish(String isPublish) {
		this.isPublish = isPublish;
	}
		
}
